//
//  HotViewcontroller.m
//  YSBEmployee
//
//  Created by developer on 2021/11/30.
//  Copyright © 2021 ysb. All rights reserved.
//

#import "AppDelegate.h"
#import "YSBCountDownManager.h"
#import "YSBHomeController.h"
#import "YSBLongTimeClockInViewController.h"
#import "YSBMediationHomeViewController.h"
#import "YSBMediationDetailsViewController.h"
#import "YSBEmployersRecommendViewController.h"
#import "YSBOfflineHomeController.h"
#import "YSBOfflineOrderPunchCardViewController.h"
#import "YSBPositionDetailsViewController.h"
#import "YSBPunchCardDetailViewController.h"
#import "YSBRecruitmentHomeViewController.h"
#import "YSBLongTimeCollectionViewController.h"



@implementation AppDelegate

- (AMapLocationManager *)locationManager
{
   if (_locationManager == nil) {

       _locationManager = [[AMapLocationManager alloc] init];
       //检测虚拟定位的风险
       _locationManager.detectRiskOfFakeLocation = NO;
       //设置期望定位精度
       [_locationManager setDesiredAccuracy:kCLLocationAccuracyHundredMeters];
       //设置不允许系统暂停定位
       [_locationManager setPausesLocationUpdatesAutomatically:NO];
       //设置允许返回逆地理编码信息
       [_locationManager setLocatingWithReGeocode:YES];
       //设置允许在后台定位
       [_locationManager setAllowsBackgroundLocationUpdates:YES];
       //设置定位超时时间
       [_locationManager setLocationTimeout:10];
       //设置逆地理超时时间
       [_locationManager setReGeocodeTimeout:5];
       [_locationManager setDelegate:self];
       _locationManager.distanceFilter = 100;
       
    }
   return _locationManager;
}

@end


@implementation YSBCountDownManager

- (AMapLocationManager *)locationManager{
    if (!_locationManager) {
        _locationManager = [[AMapLocationManager alloc] init];
        _locationManager.delegate = self;
        [_locationManager setDesiredAccuracy:kCLLocationAccuracyHundredMeters];
        _locationManager.detectRiskOfFakeLocation = NO;//不检测虚拟定位
    }
    return _locationManager;
}

@end



@implementation YSBHomeController

- (void)configLocationManager {
    if (!self.locationManager) {
        self.locationManager = [[AMapLocationManager alloc] init];
        self.locationManager.delegate = self;
        [self.locationManager setDesiredAccuracy:kCLLocationAccuracyHundredMeters];
        //单次定位超时时间
        [self.locationManager setLocationTimeout:10];
        self.locationManager.detectRiskOfFakeLocation = NO;//不检测虚拟定位
    }
    
}

@end



@implementation YSBLongTimeClockInViewController

- (AMapLocationManager *)locationManager{
    if (!_locationManager) {
        _locationManager = [[AMapLocationManager alloc] init];
        _locationManager.delegate = self;
        _locationManager.detectRiskOfFakeLocation = NO;//不检测虚拟定位
    }
    return _locationManager;
}

@end



@implementation YSBMediationHomeViewController

- (AMapLocationManager *)locationManager{
    if (!_locationManager) {
        _locationManager = [[AMapLocationManager alloc] init];
        _locationManager.delegate = self;
        _locationManager.detectRiskOfFakeLocation = NO;//不检测虚拟定位
    }
    return _locationManager;
}

@end



@implementation YSBMediationDetailsViewController

- (AMapLocationManager *)locationManager{
    if (!_locationManager) {
        _locationManager = [[AMapLocationManager alloc] init];
        _locationManager.delegate = self;
        _locationManager.detectRiskOfFakeLocation = NO;//不检测虚拟定位
    }
    return _locationManager;
}

@end



@implementation YSBEmployersRecommendViewController

- (AMapLocationManager *)locationManager{
    if (!_locationManager) {
        _locationManager = [[AMapLocationManager alloc] init];
        _locationManager.delegate = self;
        _locationManager.detectRiskOfFakeLocation = NO;//不检测虚拟定位
    }
    return _locationManager;
}

@end



@implementation YSBOfflineHomeController

- (void)configLocationManager {
    if (!self.locationManager) {
        self.locationManager = [[AMapLocationManager alloc] init];
        self.locationManager.delegate = self;
        [self.locationManager setDesiredAccuracy:kCLLocationAccuracyHundredMeters];
        //单次定位超时时间
        [self.locationManager setLocationTimeout:10];
        self.locationManager.detectRiskOfFakeLocation = NO;//不检测虚拟定位
    }
    
}

@end



@implementation YSBOfflineOrderPunchCardViewController

- (AMapLocationManager *)locationManager{
    if (!_locationManager) {
        _locationManager = [[AMapLocationManager alloc] init];
        _locationManager.delegate = self;
        _locationManager.detectRiskOfFakeLocation = NO;//不检测虚拟定位
    }
    return _locationManager;
}

@end


@implementation YSBPositionDetailsViewController

- (AMapLocationManager *)locationManager{
    if (!_locationManager) {
        _locationManager = [[AMapLocationManager alloc] init];
        _locationManager.delegate = self;
        _locationManager.detectRiskOfFakeLocation = NO;//不检测虚拟定位
    }
    return _locationManager;
}

@end



@implementation YSBPunchCardDetailViewController

- (AMapLocationManager *)locationManager{
    if (!_locationManager) {
        _locationManager = [[AMapLocationManager alloc] init];
        _locationManager.delegate = self;
        _locationManager.detectRiskOfFakeLocation = NO;//不检测虚拟定位
    }
    return _locationManager;
}

@end



@implementation YSBRecruitmentHomeViewController

- (AMapLocationManager *)locationManager{
    if (!_locationManager) {
        _locationManager = [[AMapLocationManager alloc] init];
        _locationManager.delegate = self;
        _locationManager.detectRiskOfFakeLocation = NO;//不检测虚拟定位
    }
    return _locationManager;
}

@end



@implementation YSBLongTimeCollectionViewController

- (AMapLocationManager *)locationManager{
    if (!_locationManager) {
        _locationManager = [[AMapLocationManager alloc] init];
        _locationManager.delegate = self;
        _locationManager.detectRiskOfFakeLocation = NO;//不检测虚拟定位
    }
    return _locationManager;
}

@end
